<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPH::StateEngine::StateVariable Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_s_p_h.html">SPH</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_state_engine.html">StateEngine</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html">StateVariable</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_s_p_h_1_1_state_engine_1_1_state_variable-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPH::StateEngine::StateVariable Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="state__engine_8h_source.html">state_engine.h</a>&gt;</code></p>

<p>Inherited by <a class="el" href="class_s_p_h_1_1_state_engine_1_1_added_state_variable.html">SPH::StateEngine::AddedStateVariable</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2d41a4902b7b2390e46a3a4cffc545e2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a2d41a4902b7b2390e46a3a4cffc545e2">StateVariable</a> ()</td></tr>
<tr class="separator:a2d41a4902b7b2390e46a3a4cffc545e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a5991917224e433bb6fc78d5c60117c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a6a5991917224e433bb6fc78d5c60117c">StateVariable</a> (std::string &amp;name, <a class="el" href="class_s_p_h_1_1_state_engine.html">StateEngine</a> &amp;owner, SimTK::SubsystemIndex subsys, int varindex)</td></tr>
<tr class="separator:a6a5991917224e433bb6fc78d5c60117c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf903e4eceaeadec1aabf4ddbdd43625"><td class="memItemLeft" align="right" valign="top"><a id="aaf903e4eceaeadec1aabf4ddbdd43625"></a>
std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getName</b> ()</td></tr>
<tr class="separator:aaf903e4eceaeadec1aabf4ddbdd43625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c881036c705d8cd27d23c5b39e68942"><td class="memItemLeft" align="right" valign="top"><a id="a8c881036c705d8cd27d23c5b39e68942"></a>
<a class="el" href="class_s_p_h_1_1_state_engine.html">StateEngine</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getOwner</b> ()</td></tr>
<tr class="separator:a8c881036c705d8cd27d23c5b39e68942"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a257b7931903872ecbb33169c0c55ecff"><td class="memItemLeft" align="right" valign="top">int &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a257b7931903872ecbb33169c0c55ecff">getVarIndex</a> ()</td></tr>
<tr class="separator:a257b7931903872ecbb33169c0c55ecff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaabc2de09769911c1976c0c4f219a9f5"><td class="memItemLeft" align="right" valign="top">SimTK::SubsystemIndex &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#aaabc2de09769911c1976c0c4f219a9f5">getSubsysIndex</a> ()</td></tr>
<tr class="separator:aaabc2de09769911c1976c0c4f219a9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f3b85d255fad9a5ffde8f505ad39d5e"><td class="memItemLeft" align="right" valign="top">SimTK::SystemYIndex &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a6f3b85d255fad9a5ffde8f505ad39d5e">getSystemYIndex</a> ()</td></tr>
<tr class="separator:a6f3b85d255fad9a5ffde8f505ad39d5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bc2546454638b0775eb8d712c45b7ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a8bc2546454638b0775eb8d712c45b7ab">setVarIndex</a> (int index)</td></tr>
<tr class="separator:a8bc2546454638b0775eb8d712c45b7ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d31c2917b8ba7ff3788be0b889950a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a4d31c2917b8ba7ff3788be0b889950a2">setSubsystemIndex</a> (SimTK::SubsystemIndex &amp;subsysindx)</td></tr>
<tr class="separator:a4d31c2917b8ba7ff3788be0b889950a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a559cf846fd352572efdc12f6e3a4428c"><td class="memItemLeft" align="right" valign="top">virtual Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a559cf846fd352572efdc12f6e3a4428c">getValue</a> ()=0</td></tr>
<tr class="separator:a559cf846fd352572efdc12f6e3a4428c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af179198d247d35264846ad240fea9c6d"><td class="memItemLeft" align="right" valign="top"><a id="af179198d247d35264846ad240fea9c6d"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>setValue</b> (Real value)=0</td></tr>
<tr class="separator:af179198d247d35264846ad240fea9c6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1355a04bbb57e413ec5f8a41ae178b83"><td class="memItemLeft" align="right" valign="top"><a id="a1355a04bbb57e413ec5f8a41ae178b83"></a>
virtual Real&#160;</td><td class="memItemRight" valign="bottom"><b>getDerivative</b> ()=0</td></tr>
<tr class="separator:a1355a04bbb57e413ec5f8a41ae178b83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d62b3cad319eadaf19e6d0bb15da53e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_state_engine_1_1_state_variable.html#a2d62b3cad319eadaf19e6d0bb15da53e">setDerivative</a> (Real deriv)=0</td></tr>
<tr class="separator:a2d62b3cad319eadaf19e6d0bb15da53e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Derived simbodysate must create concrete StateVariables to expose their state variables. When exposing state variables allocated by the underlying Simbody (MobilizedBody, Constraint, Force, etc...) use its interface to implement the virtual methods below. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2d41a4902b7b2390e46a3a4cffc545e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d41a4902b7b2390e46a3a4cffc545e2">&#9670;&nbsp;</a></span>StateVariable() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SPH::StateEngine::StateVariable::StateVariable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Concstructor and destructor. </p>

</div>
</div>
<a id="a6a5991917224e433bb6fc78d5c60117c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a5991917224e433bb6fc78d5c60117c">&#9670;&nbsp;</a></span>StateVariable() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SPH::StateEngine::StateVariable::StateVariable </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_s_p_h_1_1_state_engine.html">StateEngine</a> &amp;&#160;</td>
          <td class="paramname"><em>owner</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SimTK::SubsystemIndex&#160;</td>
          <td class="paramname"><em>subsys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>varindex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>state var name. </td></tr>
    <tr><td class="paramname">owner</td><td>owning component. </td></tr>
    <tr><td class="paramname">subsys</td><td>subsystem for allocation. </td></tr>
    <tr><td class="paramname">varindex</td><td>variable's index in subsystem. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aaabc2de09769911c1976c0c4f219a9f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaabc2de09769911c1976c0c4f219a9f5">&#9670;&nbsp;</a></span>getSubsysIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SimTK::SubsystemIndex&amp; SPH::StateEngine::StateVariable::getSubsysIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the index of the subsystem used to make resource allocations. </p>

</div>
</div>
<a id="a6f3b85d255fad9a5ffde8f505ad39d5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f3b85d255fad9a5ffde8f505ad39d5e">&#9670;&nbsp;</a></span>getSystemYIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">SimTK::SystemYIndex&amp; SPH::StateEngine::StateVariable::getSystemYIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the index in the global list of continuous state variables, Y. </p>

</div>
</div>
<a id="a559cf846fd352572efdc12f6e3a4428c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a559cf846fd352572efdc12f6e3a4428c">&#9670;&nbsp;</a></span>getValue()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Real SPH::StateEngine::StateVariable::getValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Concrete StateEngines implement how the state variable value is evaluated. </p>

<p>Implemented in <a class="el" href="class_s_p_h_1_1_state_engine_1_1_added_state_variable.html#a993eab162a075588c8729814d66cf5cf">SPH::StateEngine::AddedStateVariable</a>.</p>

</div>
</div>
<a id="a257b7931903872ecbb33169c0c55ecff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a257b7931903872ecbb33169c0c55ecff">&#9670;&nbsp;</a></span>getVarIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int&amp; SPH::StateEngine::StateVariable::getVarIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the index of simbody state variable. </p>

</div>
</div>
<a id="a2d62b3cad319eadaf19e6d0bb15da53e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d62b3cad319eadaf19e6d0bb15da53e">&#9670;&nbsp;</a></span>setDerivative()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SPH::StateEngine::StateVariable::setDerivative </td>
          <td>(</td>
          <td class="paramtype">Real&#160;</td>
          <td class="paramname"><em>deriv</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The derivative a state should be a cache entry and thus does not change the state. </p>

<p>Implemented in <a class="el" href="class_s_p_h_1_1_state_engine_1_1_added_state_variable.html#a6c6431798f4fa0e822b31af63733c174">SPH::StateEngine::AddedStateVariable</a>.</p>

</div>
</div>
<a id="a4d31c2917b8ba7ff3788be0b889950a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d31c2917b8ba7ff3788be0b889950a2">&#9670;&nbsp;</a></span>setSubsystemIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::StateEngine::StateVariable::setSubsystemIndex </td>
          <td>(</td>
          <td class="paramtype">SimTK::SubsystemIndex &amp;&#160;</td>
          <td class="paramname"><em>subsysindx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the index of the subsystem used to resource allocations. </p>

</div>
</div>
<a id="a8bc2546454638b0775eb8d712c45b7ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bc2546454638b0775eb8d712c45b7ab">&#9670;&nbsp;</a></span>setVarIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::StateEngine::StateVariable::setVarIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the index of simbody variable. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>SPHINXsys/src/shared/simbody_sphinxsys/<a class="el" href="state__engine_8h_source.html">state_engine.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
